<template>
  <div>
    <router-view></router-view>
  </div>
</template>

<script>
import { getAllChannelsAPI } from '@/api/index'
export default {
  // try+catch来捕获await同步代码的错误
  async created () {
    try {
      const res = await getAllChannelsAPI()
      console.log(res)
    } catch (err) {
      // 给用户弹窗
      console.dir(err)
    }
  }
}
</script>

<style></style>
